// 导入模块
const connection = require('./model/connection_model');
// 导入模块
const collect = require('./model/集合_model');
connection.connection(success);

// 成功的方法
function success() {
    let bookModel = collect.collect();
    //.新增
    bookModel.create({
        name: "红楼梦3",
        author: "曹雪芹",
        price: "40",
        is_hot: true,//是否是热销书籍
        tags: ["鬼怪", "打斗", "励志"],//书籍标签
        save_time: new Date(),//时间
        test: "test"
    }).then((err, data) => {
        if (err) {
            console.log(err);//如果增加报错就输出
            return;
        }
        console.log(data);//
    });
}
